<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>definepropety</title>

</head>
<body>
    <script>
        let data = {
            a:10,
            b:20
        }
        Object.defineProperty(data,'a',{
            value:10000,
            writable:false,  // 是否可以被修改
            enumerable:false, // 是否可以被 for in 枚举.
            configurable:false // 是否可以被 delete 操作符删除。
        })
        data.a = '0'
        delete data.a;
        console.log(data);
        for(let key in data){
            console.log(key);
        }
    </script>
</body>
</html>